package tbdp.tas.hbase;

import java.util.Map;

/**
 * hbase conn 
 * @author xbkaishui
 * @version $Id: HBaseConnection.java, v 0.1 2016-5-25 下午9:07:02 xbkaishui Exp $
 */
public class HBaseConnection {

    private String              zk;
    private String              znode;

    private Map<String, String> conf;

    public HBaseConnection(String zk, String znode) {
        this.zk = zk;
        this.znode = znode;
    }

    public String getZk() {
        return zk;
    }

    public void setZk(String zk) {
        this.zk = zk;
    }

    public String getZnode() {
        return znode;
    }

    public void setZnode(String znode) {
        this.znode = znode;
    }

    public Map<String, String> getConf() {
        return conf;
    }

    public void setConf(Map<String, String> conf) {
        this.conf = conf;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((zk == null) ? 0 : zk.hashCode());
        result = prime * result + ((znode == null) ? 0 : znode.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        HBaseConnection other = (HBaseConnection) obj;
        if (zk == null) {
            if (other.zk != null)
                return false;
        } else if (!zk.equals(other.zk))
            return false;
        if (znode == null) {
            if (other.znode != null)
                return false;
        } else if (!znode.equals(other.znode))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "HBaseConnection [zk=" + zk + ", znode=" + znode + ", conf=" + conf + "]";
    }

}
